﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace C4F.DevKit.Bluetooth
{
    namespace FileTransferProfile
    {

        /// <summary>
        /// EventArgs class to be used when a GetFile operation 
        /// completes.
        /// </summary>
        public class GetFileCompletedEventArgs : AsyncCompletedEventArgs
        {
            #region Private Members

            /// <summary>
            /// The location of the file that is being pulled.
            /// </summary>
            private string remFilePath;

            /// <summary>
            /// The content of the file that is being pulled.
            /// </summary>
            private byte[] remFileContent;

            #endregion

            #region Public Properties

            /// <summary>
            /// Gets the location of the file that is being pulled.
            /// </summary>
            public string RemoteFilePath
            {
                get
                { return this.remFilePath; }
            }
            /// <summary>
            /// Gets the content of the file that is being pulled.
            /// </summary>
            public byte[] FileContent
            {
                get
                { return this.remFileContent; }
            }

            #endregion

            #region Constructor
            /// <summary>
            /// Initializes the GetFileCompletedEventArgs object.
            /// </summary>
            /// <param name="remoteFilePath">The location of the file that was
            /// pulled.</param>
            /// <param name="fileContent">The content of the file that was 
            /// pulled.</param>
            /// <param name="error">An error that occurred during the 
            /// asynchronous operation.</param>
            /// <param name="cancelled">A value indicating whether the 
            /// asynchronous operation was cancelled.</param>
            /// <param name="userState">The user-supplied state object supplied
            /// when the asynchronous operation was requested.</param>


            public GetFileCompletedEventArgs(string remoteFilePath,
                                             byte[] fileContent,
                                             Exception error,
                                             bool cancelled,
                                             object userState)
                : base(error, cancelled, userState)
            {
                this.remFilePath = remoteFilePath;
                this.remFileContent = fileContent;
            }
            #endregion
        }
    }
}